import unittest
from datetime import datetime,timedelta

import sc_engine.youtube.service as service

class TestService(unittest.TestCase):
    def test_get_youtube_data(self):
        entry = service.get_youtube_video('dKFthNcxTZ8')

        self.assertEquals(entry['title'], 'Ever OSL 2008 Finals - July vs Best - Andromeda - Set 3')

    def test_get_by_author(self):
        entries = service.get_author_videos('markhildreth84', datetime(2009, 6, 15), datetime(2009, 6, 18))

        self.assertEquals(len(entries), 1)
        self.assertEquals(entries[0]['title'], 'Test Video')




